#ifndef __M_MSG_H__
#define __M_MSG_H__

//时间：描述本条⽇志的输出时间
//线程ID：描述本条⽇志是哪个线程输出的
//⽇志等级：描述本条⽇志的等级
//⽇志数据：本条⽇志的有效载荷数据
//⽇志⽂件名：描述本条⽇志在哪个源码⽂件中输出的
//⽇志⾏号：描述本条⽇志在源码⽂件的哪⼀⾏输出的

#include"util.hpp"
#include"level.hpp"
#include<thread>
#include<memory>

namespace log{
    struct LogMsg
    {
        time_t _ctime;
        LogLevel::value _level;
        size_t _line;
        std::thread::id _tid;
        std::string _file;
        std::string _logger;
        std::string _payload;
    
    LogMsg(LogLevel::value level,
        size_t line,
        const std::string file,
        const std::string logger,
        const std::string msg):
        _ctime(util::Date::now()),
        _level(level),
        _line(line),
        _tid(std::this_thread::get_id()),
        _file(file),
        _logger(logger),
        _payload(msg){}
    };
}
#endif
